package com.example.demo.config.annotation;

import com.example.demo.config.PhoneValidation;

import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.constraints.NotBlank;
import java.lang.annotation.*;

/**
 * @Author: 聂吉泽
 * @Description:
 * @Date: create in 2021/11/10 9:34
 */
@Documented
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {PhoneValidation.class})
public @interface PhoneAnnotation {
    String message() default "手机号格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
